package com.zucc.eye.util;

public class UrlUtil {
    //String url;

    String url="";

    //https://blog.csdn.net/tantion/article/details/88990587
    public   UrlUtil add(String add) {
        url = StrUtil.urlAdd(url, add);
        //Builder. = StrUtil.urlAdd(url, add);
        return this;
    }

    public   String get() {
        return url;

    }
    //public UrlUtil build() {
    //    return new UrlUtil(this);
    //}

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static     Builder builder=new Builder();
    //String add;
    //java builder
    public static class Builder {
        String url="";

        //https://blog.csdn.net/tantion/article/details/88990587
        public   Builder add(String add) {
            url = StrUtil.urlAdd(url, add);
            //Builder. = StrUtil.urlAdd(url, add);
            return this;
        }

        public   String get() {
            return url;

        }
        public UrlUtil build() {
            return new UrlUtil(this);
        }
    }

    private UrlUtil(Builder b) {
        this.url = b.url;
        //this.name = b.name;
    }

    public UrlUtil(String url) {
        this.url = url;
    }
}
